package com.bete.otherutils;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.widget.Toast;

import java.util.Objects;

import me.jessyan.autosize.utils.LogUtils;

public class MyRecever extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        if (Objects.equals(intent.getAction(), "com.bete.update.error")){
            String message = intent.getStringExtra("errormsg");
            LogUtils.e(" errorReceVer : " +  message );
            Toast.makeText(context, message, Toast.LENGTH_SHORT).show();
        } else if (Objects.equals(intent.getAction(), "com.bete.upload.recever")){
            String message = intent.getStringExtra("sendMessage");
            LogUtils.e(" errorReceVer : " +  message );
            Toast.makeText(context, message, Toast.LENGTH_SHORT).show();
        }


    }
}
